home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
dviware
/
qms
/
vms
/
doilatex.com
< prev
next >
Wrap
Text File
|
1990-10-01
|
3KB
|
107 lines
$ if P1 .eqs. "" then inquire P1 "$_File"
$ if P1 .eqs. "" then exit
$ doprint = 1
$ dodelete = 1
$ copystring = ""
$ PT2 = P2
$ PT3 = P3
$ PT4 = P4
$ PT5 = P5
$nextparam:
$ if PT2 .eqs. "" then goto doneparse
$ goto 'f$extract(0,3,PT2)'
$nop:
$NOP:
$ doprint = 0
$ goto checknext
$nod:
$NOD:
$ dodelete = 0
$ goto checknext
$cop:
$COP:
$ copystring = "/"+PT2
$checknext:
$ PT2 = PT3
$ PT3 = PT4
$ PT4 = PT5
$ goto nextparam
$doneparse:
$ device = f$parse(P1,,,"DEVICE")
$ directory= f$parse(P1,,,"DIRECTORY")
$ filename = f$parse(P1,,,"NAME")
$ filetype = f$parse(P1,".TEX",,"TYPE")
$ version = f$parse(P1,,,"VERSION")
$ directory = f$extract(1,f$length(directory)-2,directory)
$ filespec = "''device'[''directory']''filename'''filetype'''version'"
$ message = ""
$ NumCopies = "1"
$ response = "Y"
$ if filetype .nes. ".TEX" then -
inquire response "Is this a TeX file? (Y/N) [N]"
$ if response .nes. "Y" then goto dotex_abort
$ on control_Y then goto abort_ctrlY
$ on error then goto error_exit
$! ------------------------
$! --- Process LATeX File --- (italian hyphenation)
$! ------------------------
$ if f$search("''filespec'") .eqs. "" then goto TeXfilnotfou
$ write sys$output " executing TeX.."
$ write sys$output ""
$ assign/user_mode sys$command sys$input
$ ILATEX 'filespec'
$! ------------------------
$! --- Process DVI File ---
$! ------------------------
$ if f$search("''filename'.DVI") .eqs. "" then goto DVIfilnotfou
$ write sys$output " executing DVIQMS.."
$ assign/user_mode sys$command sys$input
$ DVIQMS 'filename''copystring'
$! ---------------------
$! --- Print BITfile ---
$! ---------------------
$ if doprint .eq. 0 then goto normexit
$ if f$search("''filename'.BIT") .eqs. "" then goto BITfilnotfou
$ delstring = ""
$ if dodelete .ne. 0 then dodelete = "/delete"
$ write sys$output " printing ''filename'.."
$ lasprint/notify'delstring' 'filename'.BIT
$normexit:
$ if dodelete .eq. 0 then exit
$ write sys$output -
" deleting temporary files.."
$! --------------------------
$! --- Delete Temp Files ----
$! --------------------------
$ if f$search("''filename'.DVI") .nes. "" then -
delete/noconfirm/nolog 'filename'.DVI;
$ if f$search("''filename'.LIS") .nes. "" then -
delete/noconfirm/nolog 'filename'.LIS;
$ exit
$!
$abort_ctrlY:
$ message = "Control-Y termination."
$ goto dotex_abort
$error_exit:
$ message = "Error detected."
$ goto dotex_abort
$TeXfilnotfou:
$ message = "Input file ''filespec' not found."
$ goto dotex_abort
$DVIfilnotfou:
$ message = "DVI file not created."
$ goto dotex_abort
$BITfilnotfou:
$ message = "BIT file not created."
$ goto dotex_abort
$dotex_abort:
$ if f$search("''filename'.DVI") .nes. "" then -
delete/noconfirm/log 'filename'.DVI;
$ if f$search("''filename'.LIS") .nes. "" then -
delete/noconfirm/log 'filename'.LIS;
$ if f$search("''filename'.BIT") .nes. "" then -
delete/noconfirm/log 'filename'.BIT;
$ write sys$output "DoTeX aborted."
$ if message .nes. "" then write sys$output message
$ exit